<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>请选择用户</title>
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function () {
		$('.commonTable tr').hover(function () {
			$(this).css('background-color', '#ffffae');
		},
        function () {
        	$(this).css('background-color', '#FFFFFF');
        });
       });
	function VerifyPage()
	{
		var str=""; 
		$("[name='uid']:checked").each(function(){ 
			str += $(this).val()+","; 
		}); 		
		if(str == ''){
			alert('请选择一个用户!');
			return false;
		}
		$("#hiduid").val(str);
		return true;
	}
</script>
</head>
<body>
<form name="form1" action="/cms/saveuserrole/ru" method="post" onSubmit="return VerifyPage();">
	<div><table class="commonTable" width="100%" cellspacing="0" cellpadding="5" >
	    <tr>
	    	<th>
		    </th>
		    <th>用户名</th>	
		    <th>姓名</th>	    
	    </tr>
		<?php foreach ($query->result() as $row){ ?>
			<tr>
			<td width="30" nowrap><input type="checkbox" id="chk_<?=$row->uid?>" name="uid" value="<?=$row->uid?>" ></td>
			<td><?=$row->uid?></td>
			<td><?=$row->uname?></td>
			</tr>
		<?php } ?>
	</table></div>
	<div style="text-align:center;"><input type="hidden" id="rid" name="rid" value="<?=$rid?>"><input type="hidden" id="hiduid" name="hiduid" value=""><input type="submit" value=" 确定 "  />&nbsp;&nbsp;<input type="button" value="取消" onclick="self.close();"/></div>
	</form>
</body>
</html>